


public class Misil implements Runnable{
	
	
	private String idMisil;
	private int a,b,c,vx,vy,vz,V; //puntos iniciales , tiempo y velocidad  
	private int x,y,z; //puntos finales de la formula 
	private String [] arrayX;
	private String [] arrayY;
	private String [] arrayZ;
	
	public Misil(String [] X,String [] Y,String [] Z){
		arrayX=X;
		arrayY=Y;
		arrayZ=Z;
		
	}
	
	
	public boolean ActualizaPosicion(){
		arrayX[x]=null;
		arrayY[y]=null;
		arrayZ[z]=null;
		
		if(c<=0||a>100000||a<0||b>100000||b<0){
			
				System.out.println("X "+x);
				
				System.out.println("Y "+y);
				
				System.out.println("Z "+z);
				
			System.out.println("Estoy por terminar");
			return false;
			
		}
		else{
		x=a;
		y=b;
		z=c;
		if(arrayX[x]==null){arrayX[x]= idMisil;}
		else{arrayX[x]=arrayX[x] + " " + idMisil;}
		
		if(arrayY[y]==null){arrayY[y]=idMisil;}
		else{arrayY[y]=arrayY[y] + " " + idMisil;}
		
		if(arrayZ[z]==null){arrayZ[z]=idMisil;}
		else{arrayZ[z]=arrayX[z] + " " + idMisil;}

		

		a= x + vx;
		b= y + vy;
		c= z - vz;
		return true;}
	}
	public void run(){
		
	}

	public String getIdMisil() {
		return idMisil;
	}

	public void setIdMisil(String idMisil) {
		this.idMisil = idMisil;
	}

	public int getA() {
		return a;
	}

	public void setA(int a) {
		this.a = a;
	}

	public int getB() {
		return b;
	}

	public void setB(int b) {
		this.b = b;
	}

	public int getC() {
		return c;
	}

	public void setC(int c) {
		this.c = c;
	}

	public int getVx() {
		return vx;
	}

	public void setVx(int vx) {
		this.vx = vx;
	}

	public int getVy() {
		return vy;
	}

	public void setVy(int vy) {
		this.vy = vy;
	}

	public int getVz() {
		return vz;
	}

	public void setVz(int vz) {
		this.vz = vz;
	}

	public int getV() {
		return V;
	}

	public void setV(int v) {
		V = v;
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public int getZ() {
		return z;
	}

	public void setZ(int z) {
		this.z = z;
	}

	
	
}
